//
//  FMDatabase+Database.h
//  News
//
//  Created by xalo on 16/3/2.
//  Copyright © 2016年 News. All rights reserved.
//

#import <FMDB/FMDB.h>
@class NewsModel;

@class VideoModel;

@class DetialModel;

@interface FMDatabase (Database)

//单例
+ (id)shareManager;
// 数据库存储网络请求的数据
- (void)saveModel:(NSArray *)newsModelArray withChannel:(NSString *)channel;
// 根据参数查询
- (NSArray *)selectNewsModelArrayWithChannel:(NSString *)channel times:(NSInteger)times;
// 根据子标题,删除数据库中对应的所有数据
- (void)deleteNewsModelArrayByChannel:(NSString *)channel;

// 存储需要收藏的newsModel
- (void)saveCollectionModel:(NewsModel *)newsModel withID:(NSString *)ID;
// 查询收藏表中的所有数据
- (NSArray *)selectAllCollection;
// 根据分类查询数据
- (NSArray *)selectCollectionByCategory:(NSString  *)category;
// 根据ID删除收藏表中的newsModel
- (void)removeCollectionModelByID:(NSString *)ID;

//收藏video
- (void)collectVideModel:(VideoModel *)videoModel;

- (void)saveCollectionOtherModel:(NSArray *)newsModel withID:(NSString *)ID ;

-(NSArray *)selectOtherCollection ;


-(NSArray *)showCollectedVideoModel;
@end
